home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_kernel_source / SCRIPTS / TAIL.TK < prev    next >
Text File  |  1999-09-17  |  2KB  |  78 lines

  1. # FILE: tail.tk
  2. # This file is boilerplate TCL/TK function definitions for 'make xconfig'.
  3. #
  4. # CHANGES
  5. # =======
  6. #
  7. # 8 January 1998, Michael Elizabeth Chastain, <mec@shout.net>
  8. # Arrange buttons in three columns for better screen fitting.
  9. #
  10.  
  11. #
  12. # Read the user's settings from .config.  These will override whatever is
  13. # in config.in.  Don't do this if the user specified a -D to force
  14. # the defaults.
  15. #
  16. if { [file readable .config] == 1} then {
  17.     if { $argc > 0 } then {
  18.         if { [lindex $argv 0] != "-D" } then {
  19.             read_config .config
  20.         }
  21.         else
  22.         {
  23.             read_config $defaults
  24.         }
  25.     } else {
  26.         read_config .config
  27.     }
  28. } else {
  29.     read_config $defaults
  30. }
  31.  
  32. update_mainmenu .f0
  33.  
  34. button .f0.right.save -anchor w -text "Save and Exit" \
  35.     -command { writeconfig .config include/linux/autoconf.h; wrapup .wrap }
  36.  
  37. button .f0.right.quit -anchor w -text "Quit Without Saving" \
  38.     -command { maybe_exit .maybe }
  39.  
  40. button .f0.right.load -anchor w -text "Load Configuration from File" \
  41.     -command { load_configfile .load "Load Configuration from file" read_config_file
  42. }
  43.  
  44. button .f0.right.store -anchor w -text "Store Configuration to File" \
  45.     -command { load_configfile .load "Store Configuration to file" write_config_file }
  46.  
  47. #
  48. # Now pack everything.
  49. #
  50.  
  51. pack .f0.right.store .f0.right.load .f0.right.quit .f0.right.save \
  52.     -padx 0 -pady 0 -side bottom -fill x
  53. pack .f0.left .f0.middle .f0.right -side left -padx 5 -pady 0 -fill y
  54. pack .f0 -padx 5 -pady 5
  55.  
  56. #
  57. # If we cannot write our config files, disable the write button.
  58. #
  59. if { [file exists .config] == 1 } then {
  60.         if { [file writable .config] == 0 } then {
  61.             .f0.right.save configure -state disabled
  62.         }
  63.     } else {
  64.         if { [file writable .] == 0 } then {
  65.             .f0.right.save configure -state disabled
  66.         }
  67.     }
  68.  
  69. if { [file exists include/linux/autoconf.h] == 1 } then {
  70.         if { [file writable include/linux/autoconf.h] == 0 } then {
  71.             .f0.right.save configure -state disabled
  72.         }
  73.     } else {
  74.         if { [file writable include/linux/] == 0 } then {
  75.             .f0.right.save configure -state disabled
  76.         }
  77.     }
  78.